module.exports = {
    configureWebpack: {
        resolve: {
            alias: {
                // 设置此项确保vue组件里面使用template不会有Vue Warn
                'vue$': 'vue/dist/vue.esm.js'
            }
        }
    },
    devServer: {
        proxy: {
            "/api": {
                target: "http://localhost:8000",
                changeOrigin: true,
            },
            "/media": {
                target: "http://localhost:8000",
                changeOrigin: true,
            }
        },
        // 多页面访问
        historyApiFallback: {
            rewrites: [
                {from: /^\/editor/, to: '/static/editor.html'}
            ]
        }
    },
    publicPath: '/static',  // 打包后的静态路径
    productionSourceMap: false,
    pages: {//配置多页面入口
        editor: {
            entry: 'src/editor.main.js',
            template: 'public/editor.html',
        },
        index: {
            entry: 'src/main.js',
            template: 'public/index.html',
        },
    }
}
